package cn.edu.neusoft.demo.hospital2.Dao;

import cn.edu.neusoft.demo.hospital2.pojo.Doctor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DoctorDao extends BaseMapper<Doctor> {
    @Select("SELECT * FROM doctor")
    List<Doctor> selectList();

    // 可以删除这个方法，因为与selectList()功能重复
    // List<Doctor> getAllDoctors();

    Doctor getDoctorById(String docId);

    // 添加新增方法
    int addDoctor(Doctor doctor);

    // 添加删除方法
    int deleteDoctorById(String docId);

    // 添加更新方法
    int updateDoctorById(Doctor doctor);

    List<Doctor> getAllDoctors();
}